import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/Home.vue'
import Versions from '@/views/Versions.vue'
import Settings from '../views/SystemSettings.vue'

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            name: 'Home',
            component: Home
        },
        {
            path: '/security',
            name: 'SecurityCenter',
            component: () => import('@/views/SecurityCenter.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/clients',
            name: 'Clients',
            component: () => import('@/views/ClientsAnalysis.vue')
        },
        {
            path: '/versions',
            name: 'Versions',
            component: Versions
        },
        {
            path: '/settings', // 确保路径与menuItems中的path一致
            name: 'SystemSettings',
            component: Settings
        }
    ]
})

export default router